package com.dmx.platform.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TBaseinfo entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "t_baseinfo")
public class TBaseinfo implements java.io.Serializable {

	// Fields

	private Integer baseId;
	private Integer type;
	private String name;
	private String city;
	private String region;
	private String address;
	private Integer level;
	private Float positionX;
	private Float positionY;
	private String description;
	private String contact;
	private Long telphone;
	private String mobile;
	private Integer status;
	private String icon;
	private Date recordTime;
	private Float ratio;
	private Set<TDetailinfo> TDetailinfos = new HashSet<TDetailinfo>(0);
	private List<TImage> imageInfos = new ArrayList<TImage>(0);

	// Constructors

	/** default constructor */
	public TBaseinfo() {
	}



	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "base_id", unique = true, nullable = false)
	public Integer getBaseId() {
		return this.baseId;
	}

	public void setBaseId(Integer baseId) {
		this.baseId = baseId;
	}

	@Column(name = "type")
	public Integer getType() {
		return this.type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "city", length = 30)
	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "region", length = 30)
	public String getRegion() {
		return this.region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	@Column(name = "address", length = 100)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "level")
	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	@Column(name = "position_x", precision = 10, scale = 10)
	public Float getPositionX() {
		return this.positionX;
	}

	public void setPositionX(Float positionX) {
		this.positionX = positionX;
	}

	@Column(name = "position_y", precision = 10, scale = 10)
	public Float getPositionY() {
		return this.positionY;
	}

	public void setPositionY(Float positionY) {
		this.positionY = positionY;
	}

	@Column(name = "description", length = 200)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "contact", length = 50)
	public String getContact() {
		return this.contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	@Column(name = "telphone", precision = 10, scale = 0)
	public Long getTelphone() {
		return this.telphone;
	}

	public void setTelphone(Long telphone) {
		this.telphone = telphone;
	}

	@Column(name = "mobile")
	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "icon", length = 200)
	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "record_time", length = 0)
	public Date getRecordTime() {
		return this.recordTime;
	}

	public void setRecordTime(Date recordTime) {
		this.recordTime = recordTime;
	}

	@Column(name = "ratio", precision = 3)
	public Float getRatio() {
		return this.ratio;
	}

	public void setRatio(Float ratio) {
		this.ratio = ratio;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TBaseinfo")
	public Set<TDetailinfo> getTDetailinfos() {
		return this.TDetailinfos;
	}

	public void setTDetailinfos(Set<TDetailinfo> TDetailinfos) {
		this.TDetailinfos = TDetailinfos;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "ownerId")
	public List<TImage> getImageInfos() {
		return imageInfos;
	}

	public void setImageInfos(List<TImage> imageInfos) {
		this.imageInfos = imageInfos;
	}

}